<?php

class CLog extends CBase {
	
	function __construct() {
	
	}
	
	public static function write($content,$dir=null,$fileName=null)
	{
		$logClass = Config::get("log.class","CLogFile");
		
		if(class_exists($logClass))
		{
			$logCls = new $logClass();
			
			if($logCls instanceof ILog){
				$logCls->write($content,$dir,$fileName);
			}
			else
			{
				CError::handler(E_ERROR,"类[".$logClass."]必须继承自接口ILog",__FILE__,__LINE__);
			}
		}
		else
		{
			CError::handler(E_ERROR,"类[".$logClass."]不存在",__FILE__,__LINE__);
		}
	}
}

?>